/*****************************************************************
myd engine v0.1

File: myd_vertexbuffer.inl
Created: 26/05/09
*****************************************************************/
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
unsigned int Vertexbuffer<VertexFormat,FVF>::currentId = 0;
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
Vertexbuffer<VertexFormat,FVF>::Vertexbuffer(unsigned int count)
:
uiId(currentId++),
vertices(count)
{
	
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
Vertexbuffer<VertexFormat,FVF>::~Vertexbuffer(void)
{
	
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
void Vertexbuffer<VertexFormat,FVF>::setVertex(unsigned int index, const VertexFormat& v)
{
	vertices[index] = v;
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
const VertexFormat& Vertexbuffer<VertexFormat,FVF>::getVertex(unsigned int index) const
{
	return vertices[index];
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
VertexFormat& Vertexbuffer<VertexFormat,FVF>::getVertex(unsigned int index)
{
	return vertices[index];
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
const VertexFormat* Vertexbuffer<VertexFormat,FVF>::getVertices() const
{
	return &( vertices.front() );
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
size_t Vertexbuffer<VertexFormat,FVF>::getVertexCount () const
{
	return vertices.size();
}
//-----------------------------------------------------------------
template <class VertexFormat, unsigned int FVF>
unsigned int Vertexbuffer<VertexFormat,FVF>::getId() const
{
	return uiId;
}
//-----------------------------------------------------------------
